<?php /*a:3:{s:47:"/www/wwwroot/ams/app/index/view/user/index.html";i:1588835393;s:50:"/www/wwwroot/ams/app/index/view/public/header.html";i:1588821168;s:50:"/www/wwwroot/ams/app/index/view/public/footer.html";i:1588833951;}*/ ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <link rel="apple-touch-icon" sizes="76x76" href="/static/index/moban/assets/img/apple-icon.png">
    <link rel="icon" type="image/png" href="/static/index/moban/assets/img/favicon.png">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title>首页 | <?php echo htmlentities($system_name); ?></title>
    <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
        name='viewport' />
    <link href="/static/index/moban/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link href="/static/index/moban/assets/css/now-ui-kit.css?v=1.1.0" rel="stylesheet" />
    <link href="/static/index/moban/assets/css/font-awesome.min.css" rel="stylesheet" />

    <!-- 加载 echarts -->
    <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
</head>

<body class="index-page sidebar-collapse">

    <!-- 引入导航栏 -->
    <nav class="navbar navbar-expand-lg bg-info fixed-top">
    <div class="container">
        <div class="navbar-translate">
            <div class="navbar-brand text-white" style="font-size: 22px;"><?php echo htmlentities($system_name); ?></div>
            <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse"
                data-target="#example-navbar-info" aria-controls="navbarSupportedContent" aria-expanded="false"
                aria-label="Toggle navigation">
                <span class="navbar-toggler-bar bar1"></span>
                <span class="navbar-toggler-bar bar2"></span>
                <span class="navbar-toggler-bar bar3"></span>
            </button>
        </div>

        <div class="collapse navbar-collapse justify-content-end has-image" id="example-navbar-info">
            <ul class="navbar-nav">
                <li class="nav-item" style="float: right;">
                    <a class="nav-link" href="<?php echo url('index/index'); ?>">
                        <p style="font-size: 16px;">首页</p>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="<?php echo url('index/notice_list'); ?>">
                        <p style="font-size: 16px;">更多资讯</p>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="<?php echo url('index/link'); ?>">
                        <p style="font-size: 16px;">友情链接</p>
                    </a>
                </li>
                <?php if($user_info): ?>
                <li class="nav-item active">
                    <a class="nav-link" href="<?php echo url('User/index'); ?>">
                        <p><?php echo htmlentities($user_info->name); ?></p>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="<?php echo url('Login/logout'); ?>">
                        <p>退出</p>
                    </a>
                </li>
                <?php else: if($registered): ?>
                <li class="nav-item">
                    <a class="nav-link" href="<?php echo url('Login/index'); ?>">
                        <p>登录</p>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="<?php echo url('Login/register'); ?>">
                        <p>注册</p>
                    </a>
                </li>
                <?php else: ?>
                <li class="nav-item">
                    <a class="nav-link" href="<?php echo url('Login/index'); ?>">
                        <p>登录</p>
                    </a>
                </li>
                <?php endif; ?>
                <?php endif; ?>
            </ul>
        </div>
    </div>
</nav>
<!-- 向下推65像素 -->
<div style="height: 65px;"></div>

<!-- 防止闪屏 -->
<script src="/static/index/moban/assets/js/plugins/jquery.sharrre.js" type="text/javascript"></script>
<!-- Code JS File -->
<script src="/static/index/moban/assets/js/core/jquery.3.2.1.min.js" type="text/javascript"></script>
<script src="/static/index/moban/assets/js/core/popper.min.js" type="text/javascript"></script>
<script src="/static/index/moban/assets/js/core/bootstrap.min.js" type="text/javascript"></script>

<!-- 弹出层 -->
<script src="/static/admin/lib/layer/layer.js"></script>

<!-- 模板动作 -->
<script src="/static/index/moban/assets/js/now-ui-kit.js?v=1.1.0" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        // the body of this function is in assets/js/now-ui-kit.js
        nowuiKit.initSliders();
    });

    function scrollToDownload() {

        if ($('.section-download').length != 0) {
            $("html, body").animate({
                scrollTop: $('.section-download').offset().top
            }, 1000);
        }
    }
</script>

    <div class="container" style="margin-bottom: 10px;">
        <!-- 个人信息 -->
        <div class="row">
            <div class="col-md-12">
                <h3>个人基本信息</h3>
            </div>
            <div class="col-md-12">
                <div class="table-responsive">
                    <table class="table">
                        <tr>
                            <td>姓名</td>
                            <td><?php echo htmlentities($user_info_data['name']); ?></td>
                            <td>年龄</td>
                            <td><?php echo htmlentities($user_info_data['age']); ?></td>

                        </tr>
                        <tr>
                            <td>职务</td>
                            <td><?php echo htmlentities($user_info_data['position']); ?></td>
                            <td>手机</td>
                            <td><?php echo htmlentities($user_info_data['phone']); ?></td>
                        </tr>
                        <tr>
                            <td>邮箱</td>
                            <td><?php echo htmlentities($user_info_data['email']); ?></td>
                            <td>QQ</td>
                            <td><?php echo htmlentities($user_info_data['qq']); ?></td>
                        </tr>
                        <tr>
                            <td>办公室电话</td>
                            <td><?php echo htmlentities($user_info_data['tel']); ?></td>
                            <td>微信</td>
                            <td><?php echo htmlentities($user_info_data['wx']); ?></td>
                        </tr>
                        <tr>
                            <td>办公室地址</td>
                            <td colspan="3"><?php echo htmlentities($user_info_data['address']); ?></td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>

        <!-- 功能列表 -->
        <div class="row">
            <div class="col-md-12">
                <h3>功能列表</h3>
            </div>
            <div class="col-md-12">
                <ul class="nav nav-pills nav-pills-primary" role="tablist">

                    <?php if($all_super_authority or $common_role): ?>
                    <li class="nav-item" onclick="user_edit('<?php echo htmlentities($user_info_data['id']); ?>')" style="cursor: pointer;">
                        <span class="nav-link active" data-toggle="tab" role="tablist" aria-expanded="false">
                            <i class="fa fa-user-circle-o"></i>
                        </span>
                        <p>修改信息</p>
                    </li>
                    <?php endif; if($all_super_authority or $common_role): ?>
                    <li class="nav-item" onclick="user_password('<?php echo htmlentities($user_info_data['id']); ?>')" style="cursor: pointer;">
                        <span class="nav-link active" data-toggle="tab" role="tablist" aria-expanded="false">
                            <i class="fa fa-lock"></i>
                        </span>
                        <p>修改密码</p>
                    </li>
                    <?php endif; if($all_super_authority or $results_management): ?>
                    <li class="nav-item" onclick="achievement('<?php echo htmlentities($user_info_data['id']); ?>')" style="cursor: pointer;">
                        <span class="nav-link active" data-toggle="tab" role="tablist" aria-expanded="true">
                            <i class="fa fa-edit"></i>
                        </span>
                        <p>成果管理</p>
                    </li>
                    <?php endif; if($all_super_authority or $results_the_audit): ?>
                    <li class="nav-item" onclick="achievement_audit('<?php echo htmlentities($user_info_data['id']); ?>')" style="cursor: pointer;">
                        <span class="nav-link active" data-toggle="tab" role="tablist" aria-expanded="true">
                            <i class="fa fa-battery-3"></i>
                        </span>
                        <p>成果审核</p>
                    </li>
                    <?php endif; ?>

                    <!--                     
                        <li class="nav-item" >
                        <span class="nav-link disabled" data-toggle="tab" role="tablist">
                            <i class="fa fa-exclamation"></i>
                        </span>
                        <p>成果录入</p>
                    </li> -->
                </ul>
            </div>
        </div>


        <!-- 审核进度 -->
        <!-- <div class="row" style="margin-top: 60px;">
            <div class="col-md-12">
                <h3>审核进度</h3>
            </div>
            <div class="col-md-12">

            </div>
        </div> -->

        <!-- 成果统计图表 -->

        <div class="row" style="border-radius: 20px ;height: 455px;border: 1px solid #ddd;">
            <div class="col-md-12">
                <h3>成果统计图表</h3>
                <div id="charts_data" style="display:none"><?php echo htmlentities($achievement_analysis_res); ?></div>
                <div id="charts_data_2" style="display:none"><?php echo htmlentities($achievement_analysis_through_count_res); ?></div>
            </div>
            <!-- 柱状图 -->
            <div class="col-md-6">
                <div id="charts_bar" style="width: 100%;height:400px;"></div>
            </div>
            <!-- 分布图 -->
            <div class="col-md-6">
                <div id="negative" style="width: 100%;height:400px;"></div>
            </div>
        </div>


    </div>

    <!-- 引入页脚 -->
    <footer class="footer " style="background-color: #ddd;">
    <div style="text-align: center;">
        Copyright © 2020 夏立军 山东建筑大学-<?php echo htmlentities($system_name); ?> 201611106025
    </div>
</footer>

    <!-- 加载 echarts JS -->
    <script src="/static/index/index-echarts/myChart.js"></script>

    <script>
        var data = HTMLDecode($('#charts_data').html());
        data = JSON.parse(data);

        var data2 = HTMLDecode($('#charts_data_2').html());
        data2 = JSON.parse(data2);

        if (data != '') {
            // 柱状图
            var charts_bar = echarts.init(document.getElementById('charts_bar'));
            var option = myCharts.charts_bar('各个成果总量', '成果总量', data);
            charts_bar.setOption(option);
        }

        if (data2 != '') {
            // 分布图
            var negative = echarts.init(document.getElementById('negative'));
            var option = myCharts.negative(data2);
            negative.setOption(option);
        }

        // 转义字符
        function HTMLDecode(text) {
            var temp = document.createElement("div");
            temp.innerHTML = text;
            var output = temp.innerText || temp.textContent;
            temp = null;
            return output;
        }
    </script>

    <script>
        // 用户信息编辑
        function user_edit(uid) {
            redirect_url("<?php echo url('User/user_edit'); ?>?uid=" + uid);
        }

        // 修改密码
        function user_password(uid) {
            redirect_url("<?php echo url('User/user_password'); ?>?uid=" + uid);
        }

        // 成果管理
        function achievement(uid) {
            redirect_url("<?php echo url('Achievement/index'); ?>?uid=" + uid);
        }

        // 成果审核
        function achievement_audit(uid) {
            redirect_url("<?php echo url('achievement_audit/index'); ?>?uid=" + uid);
        }

        // 重定向
        function redirect_url(url) {
            window.location.href = url;
        }
    </script>

</body>

</html>